package Pronostics.tests;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import Pronostics.Player;

public class PlayerTest {
	
	private static Player p;
	
	@Before
	public void create() {
		p = new Player("test");
	}
	
	@Test
	public void testConstructeur(){
		Player p = new Player("toto");
		assertEquals(p.getChoose(), true);
		assertEquals(p.getName(), "toto");
		assertEquals(p.getDayResult(), -1);
		assertEquals(p.getTotalResult(), 0);
		assertEquals(p.getTab().length, 20);
		assertEquals(p.getGoodResult(), 0);
		assertEquals(p.getNbGoalDifference(), 0);
		assertEquals(p.getTotalGoodResult(), 0);
		assertEquals(p.getTotalNbGoalDifference(), 0);
	}
	
	@Test
	public void testChoose() {
		boolean esperate = true;
		p.setChoose(true);
		assertEquals(esperate, p.getChoose());
	}
	
	@Test 
	public void testSetNbGoalDifference() {
		int esperate = 50;
		p.setNbGoalDifference(esperate);
		assertEquals(esperate, p.getNbGoalDifference());
	}

	
}
